package web.fabrimind.pm.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import web.fabrimind.common.annotation.Excel;
import web.fabrimind.common.core.domain.BaseEntity;

/**
 * BOM明细对象 bom_detail
 * 
 * @author zhihui
 * @date 2025-03-25
 */
public class BomDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 明细ID */
    private Long detailId;

    /** BOM ID */
    @Excel(name = "BOM ID")
    private Long bomId;

    /** 物料ID */
    @Excel(name = "物料ID")
    private Long materialId;

    /** 数量 */
    @Excel(name = "数量")
    private BigDecimal quantity;

    /** 单位 */
    @Excel(name = "单位")
    private String unit;

    /** 项目顺序 */
    @Excel(name = "项目顺序")
    private Long itemOrder;

    /** 是否关键物料（0否 1是） */
    @Excel(name = "是否关键物料", readConverterExp = "0=否,1=是")
    private String isKeyMaterial;

    public void setDetailId(Long detailId) 
    {
        this.detailId = detailId;
    }

    public Long getDetailId() 
    {
        return detailId;
    }
    public void setBomId(Long bomId) 
    {
        this.bomId = bomId;
    }

    public Long getBomId() 
    {
        return bomId;
    }
    public void setMaterialId(Long materialId) 
    {
        this.materialId = materialId;
    }

    public Long getMaterialId() 
    {
        return materialId;
    }
    public void setQuantity(BigDecimal quantity) 
    {
        this.quantity = quantity;
    }

    public BigDecimal getQuantity() 
    {
        return quantity;
    }
    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }
    public void setItemOrder(Long itemOrder) 
    {
        this.itemOrder = itemOrder;
    }

    public Long getItemOrder() 
    {
        return itemOrder;
    }
    public void setIsKeyMaterial(String isKeyMaterial) 
    {
        this.isKeyMaterial = isKeyMaterial;
    }

    public String getIsKeyMaterial() 
    {
        return isKeyMaterial;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("detailId", getDetailId())
            .append("bomId", getBomId())
            .append("materialId", getMaterialId())
            .append("quantity", getQuantity())
            .append("unit", getUnit())
            .append("itemOrder", getItemOrder())
            .append("isKeyMaterial", getIsKeyMaterial())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
